//
// Created by cychen on 2023/3/8.
//

#ifndef LIST_CONFIG_H
#define LIST_CONFIG_H

#include <string>
#include <ostream>
#include "Const.h"

using namespace std;

class Config {
private:
    static Config *instance;
    bool ring = false;
    int headLimit = -1;
    int tailLimit = -1;
    int rejectLimit = -1;
    int state = STATE_EMPTY;

    std::string testStr = string("testStr");
    Config() = default;

public:
    static void resetInstance();

    static Config *getInstance();

    bool isRing() const;

    void setRing(bool ring);

    int getHeadLimit() const;

    void setHeadLimit(int headLimit);

    int getTailLimit() const;

    void setTailLimit(int tailLimit);

    int getRejectLimit() const;

    void setRejectLimit(int rejectLimit);

    int getState() const;

    void setState(int state);

    virtual ~Config();
};

#endif //LIST_CONFIG_H
